import js from "@eslint/js";
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import stylisticTs from '@stylistic/eslint-plugin-ts'
export default tseslint.config(
    {
        files: ['src/**/*.ts', 'src/**/*.vue', 'src/*.vue'],
        extends: [
            js.configs.recommended,
            ...tseslint.configs.recommended,
            ...pluginVue.configs['flat/recommended'],
            
        ],
        plugins: {
            '@stylistic/ts': stylisticTs
        },
        rules: {
            'vue/html-indent': ['warn', 1, {
                'attribute': 1,
                'baseIndent': 4
            }],
            'vue/multi-word-component-names': 'off',
            'vue/compiler-sfc': 'off',
            'no-console': 'warn',
            'no-eval': 'error',
            'camelcase': 'warn',
            'eqeqeq': 'warn',
            'no-empty-function': 'warn',
            'no-var': 'error',
            '@stylistic/ts/indent': ['warn', 4],
            '@stylistic/ts/quotes': ['warn', 'single'],
            '@stylistic/ts/semi': ['warn']
        }
    },{
        files: ['src/**/*.vue', 'src/*.vue'],
        languageOptions: {
            parserOptions: {
                parser: '@typescript-eslint/parser'
            }
        }
    }
)